package com.un.ebs.inventory.domain;

import java.util.Date;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.stereotype.Component;
import lombok.Data;
import com.un.ebs.core.metadata.DbField;

/**
 * (Inventory)表实体类
 *
 * @author liubo
 * @since 2020-09-13 23:42:15
 */
@Data
@Component
@TableName("tb_inventory")
@SuppressWarnings("serial")
public class Inventory extends Model<Inventory> {

    @TableId(value = "id", type = IdType.UUID)
    private String id;


    @DbField(name = "sku_id", length = 40, precision = 0)
    private String skuId;

    @DbField(name = "warehouse_id", length = 40, precision = 0)
    private String warehouseId;

    @DbField(name = "qty", length = 18, precision = 6)
    private Double qty;

    @DbField(name = "lock_by_in_qty", length = 18, precision = 6)
    private Double lockByInQty;

    @DbField(name = "lock_by_out_qty", length = 18, precision = 6)
    private Double lockByOutQty;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_time", length = -1, precision = 0)
    private Date createTime;

    @DbField(name = "last_update_time", length = -1, precision = 0)
    private Date lastUpdateTime;

    @DbField(name = "tenant_id", length = 40, precision = 0)
    private String tenantId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}